Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding image_uri to docstring of runtime_env #48884

Merged
merged 12 commits into from
Dec 4, 2024

Conversation

japneet-anyscale
Copy link
Contributor

Adding image_uri description and example to docstring. The parameter is in the signature, but not in the description section for the parameters.

cc: @jjyao

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@japneet-anyscale
Copy link
Contributor Author

cc @angelinalg


# Example for using image_uri
RuntimeEnv(
image_uri="anyscale/ray:2.30.0-py39")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to the public ray docker image instead of the private anyscale one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@jjyao
Copy link
Collaborator

jjyao commented Nov 25, 2024

@zcin could you review this PR?

@jjyao
Copy link
Collaborator

jjyao commented Nov 26, 2024

@japneet-anyscale lint failed, could you fix it?

Comment on lines 273 to 275
image_uri: URI to a container image. The Ray worker process runs
in a container with this image. You can't use this parameter with
other fields of runtime_env.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use it with config and env_vars

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


# Example for using image_uri
RuntimeEnv(
image_uri="anyscale/ray:2.30.0-py39")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@japneet-anyscale
Copy link
Contributor Author

@jjyao @zcin I made the changes that you suggested

@@ -266,6 +270,9 @@ class MyClass:
config: config for runtime environment. Either
a dict or a RuntimeEnvConfig. Field: (1) setup_timeout_seconds, the
timeout of runtime environment creation, timeout is in seconds.
image_uri: URI to a container image. The Ray worker process runs
in a container with this image. Does not work with runtime env
Copy link
Contributor

@angelinalg angelinalg Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in a container with this image. Does not work with runtime env
in a container with this image. This parameter only works alone or with the

@@ -266,6 +270,9 @@ class MyClass:
config: config for runtime environment. Either
a dict or a RuntimeEnvConfig. Field: (1) setup_timeout_seconds, the
timeout of runtime environment creation, timeout is in seconds.
image_uri: URI to a container image. The Ray worker process runs
in a container with this image. Does not work with runtime env
fields that are not ``config`` and ``env_vars``
Copy link
Contributor

@angelinalg angelinalg Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fields that are not ``config`` and ``env_vars``
``config`` or ``env_vars`` parameter. You can't use it with any other option.

Copy link
Contributor

@angelinalg angelinalg Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just trying to avoid a double negative sentence. Please adjust accordingly. I'm not sure what the sentence is trying to say. To clarify, are you trying to say that this parameter can only be used with config and env_vars?

Also, can we capture these requirements in the signature? Otherwise the signature is misleading.

@japneet-anyscale
Copy link
Contributor Author

@zcin @jjyao fixed image_uri wording and style per @angelinalg

@jjyao jjyao added the go add ONLY when ready to merge, run all tests label Dec 4, 2024
@jjyao jjyao requested review from angelinalg and jjyao December 4, 2024 00:10
@angelinalg angelinalg enabled auto-merge (squash) December 4, 2024 00:16
@github-actions github-actions bot disabled auto-merge December 4, 2024 00:19
@jjyao jjyao merged commit 53233d9 into ray-project:master Dec 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants